-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH Restrict which repos get dispatch-ci #40
ENH Restrict which repos get dispatch-ci #40
Conversation
772c190
to
5fe7e57
Compare
5fe7e57
to
905f5fb
Compare
write_file_even_if_exists('.github/workflows/dispatch-ci.yml', $content); | ||
$dispatchCiPath = '.github/workflows/dispatch-ci.yml'; | ||
$ciPath = '.github/workflows/ci.yml'; | ||
$shouldHaveDispatchCi = (is_module() || is_composer_plugin()) && !is_docs() && !is_gha_repository(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Realistically I think is_module() || is_composer_plugin()
is all that's needed here, but doesn't hurt to be explicit so it can stay as is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I assume you've tested it.
Issue #37
Note I ended up putting in some checking for is_meta_repo() aka .github repo which recently was added, this is required otherwise you cannot do a full dry-run
We want still want dispatch-ci on composer-plugins() specifically for vendor-plugin() which integrates with other things - https://github.com/silverstripe/vendor-plugin/actions/runs/7871071271
recipe-plugin() only does linting, so it's a bit pointless being on a cron like this though it's cleaner to just keep it on dispatch-ci - https://github.com/silverstripe/recipe-plugin/actions/runs/7854707347
should_use_dispatch_ci() will return as follows for the repos: